package com.cy.aircompressor.api;

import com.cy.aircompressor.entity.maintenance.MaintenanceRecord;
import com.cy.aircompressor.entity.system.UserInfo;
import com.cy.aircompressor.entity.warning.WarningMsg;
import com.drug.lib.view.recycptr.bean.RowEntity;
import com.net.model.bean.BaseResponse;

import java.util.Map;

import io.reactivex.Flowable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

//空压机维保记录
public interface MaintenanceApi {

    /**
     * 新增
     *
     * @return Flowable
     */
    @POST("maintenanceRecord/add")
    @Headers({"Content-Type:application/json;charset=UTF-8"})
    Flowable<BaseResponse<Object>> addMaintenanceRecord(@Body Object body);

    /**
     * queryById
     * 根据id查询
     *
     * @return Flowable
     */
    @GET("maintenanceRecord/queryById")
    Flowable<BaseResponse<MaintenanceRecord>> queryMaintenanceRecordById(@Query("id") String id);

    /**
     * 条件分页查询
     *
     * @return Flowable
     */
    @GET("maintenanceRecord/queryPage")
    Flowable<BaseResponse<RowEntity<MaintenanceRecord>>> queryMaintenanceRecordByPage(@Query("pageNum") Integer pageNum, @Query("pageSize") Integer pageSize,
                                                                                      @Query("compressorId") String compressorId, @Query("powerStationId") String powerStationId);
}
